package service;

import java.util.ArrayList;
import java.util.List;

import bean.Person;

public class MyServiceImpl implements MyService {

	public List<Person> getAllPersonList() {
		List<Person> ls = new ArrayList<Person>();
		Person p = new Person();
		p.setAge(32);
		p.setName("jack");
		ls.add(p);
		
		p = new Person();
		p.setAge(28);
		p.setName("movea");
		ls.add(p);
		
		p = new Person();
		p.setAge(1);
		p.setName("ziheng");
		ls.add(p);
//		ls.add(new Person("jack",32));
//		ls.add(new Person("movea",28));
//		ls.add(new Person("ziheng",1));
		return ls;
	}

	public Object[] getAllPersonObj() {
		Object[] objs = new Object[3];
		for(int i=0;i<objs.length;i++){
			Person p = new Person();
			p.setAge(i);
			p.setName("jack"+i);
			objs[i] = p;
		}
		return objs;
	}

}
